//star
$(function() {
	var stepW = 24;
    var description = new Array("1星","2星","3星","4星","5星");
    var descriptionTemp;
    $(".showb").css("width", 0);
    $("ul.star li").click(function() {
    	var n = $(this).index() + 1;
    	$(this).parents(".star-box").find(".showb").css({"width":stepW * n});
    	descriptionTemp = description[n - 1];
        $(this).find('a').blur();
        $(this).parents("ul.star").siblings("input[type='hidden'][name='recommend']").val($(this).find('a').attr('title'));
        return stopDefault(e);
        return descriptionTemp;
    });
    
    $("ul.star li").hover(
    	function(){
    		$(this).parents(".star-box").siblings(".description").text(description[$(this).index()]);
            //$(".description:last").text(description[$(this).index()]);
        },
        function(){
            if(descriptionTemp != null)
            	$(this).parents(".star-box").siblings(".description").text("您的评价是："+descriptionTemp);
            else 
            	$(this).parents(".star-box").siblings(".description").text("");
        }
    );
});
function stopDefault(e){
    if(e && e.preventDefault)
    	e.preventDefault();
    else
    	window.event.returnValue = false;
    return false;
};
